package com.ibm.cps.kafka;

import kafka.producer.Partitioner;
import kafka.utils.VerifiableProperties;

public class MessagePartitioner implements Partitioner {

	public MessagePartitioner(VerifiableProperties props) {

	}

	@Override
	public int partition(Object key, int numPartitions) {
		long tsKey = Long.parseLong((String) key);
		return (int) (tsKey % numPartitions);
	}

}
